In the past few years numerous services, offered by both private and public suppliers, have received widespread acceptance. These services, known as "multimedia" services, provide video information, including sequences of moving pictures, still pictures, text, sound information and other data. Among these services, the so called "Video on demand" is quite important: it allows the user to select movies from his own home at any time, with no need to follow a predetermined viewing schedule. Other services include broadcasting of advertising videos, didactic or teleworking-related videos, etc.
For these applications it is necessary to convert into digital form the signals generated from the various sources, which entails the need to process, store and transfer large amounts of data. Given the limited capacities of current transmission and recording supports, it is therefore necessary to have a coding method which allows elimination of all the information that is not strictly necessary for the good quality of the presentation.
For that purpose, various coding methods have been defined among which are standard ISO/IEC 11172, also known as the MPEG1 standard from the initials of the Moving Picture Expert Group which has developed it.
When a sequence of moving pictures and associated audio, recorded in a centralized file, is to be presented at a remote terminal, it is necessary to process audio and video information simultaneously. The two kinds of information must therefore be joined into a single digital stream with a multiplexing process. For the presentation to the user, video and audio information have to be separated again, by an inverse or demultiplexing process, as presentation occurs on different devices (monitor, loudspeaker).
In general, when it is desired for instance to insert into the complete stream also some subtitles to be displayed during the presentation, or when the possibility is envisaged of offering the user more than one audio channel, the multiplexing/demultiplexing processes must allow operating on more than two input streams.
A complete system for producing an MPEG1-coded stream therefore comprises several input streams, each related to a certain type of information. Each stream is generated by a source (TV camera, microphone, etc.) and is coded according to the aforesaid standard. Downstream of the coders, the individual streams are multiplexed into a single output stream.
Analogously, the decoding system includes a demultiplexer, which extracts the individual streams and routes them to the respective decoders. Here, the different signals are converted again to their original form and are then passed on to the presentation devices.
The multiplexing process adopted according to the MPEG1 standard is a time-division multiplexing process. The overall stream is structured as a sequence of intervals called packets, each of which contains data of a single type, indicated in a header of the packet itself.
For each interval, the multiplexer has to decide from which input stream it should take the data in order to construct the packets. The MPEG1 standard imposes no restrictions on this choice, with the only constraint that the stream produced is to be decoded without bringing a model decoder, defined in the standard, to conditions where data underflow or overflow occur in its input buffers.
Paragraph 5 of Annex A of document ISO/IEC 11172 defining the above mentioned MPEG1 standard, reports by way of example a multiplexing method which utilizes a strategy called "Proportional rate" strategy. This strategy is based on a fixed and cyclically repeated scheme for choosing the streams to be multiplexed. Within this scheme, each elementary stream is assigned a number of packets that is proportional to its nominal bit rate. In this way, the average frequency of each elementary stream within the complete stream is equal to the nominal bit rate, over a time interval that is as short as possible.
The limitation of this process is due to the fact that the actual bit rates of the incoming streams in reality are not constant, but rather fluctuate around their nominal values. This is mainly due to the fact that the coded pictures have sizes, in terms of bit number, that can substantially vary for reasons intrinsic to the coding process, while their durations (time interval during which a picture is visualized) are fixed. It is therefore clear that the presence of a certain number of "large" pictures close to one another within the sequence causes the decoder to extract, from its input buffer, data at higher speed than the nominal bit rate of the video stream, thus creating underflow problems. Analogously, the presence of several "small" pictures close to one another may bring about overflow problems.
These drawbacks are obviated by the method according to the present invention, which takes into account the trends of the amounts of data in the decoder input buffers, thus avoiding possible underflow and overflow conditions. Furthermore, this method can be applied to any number of input streams without introducing particular complications in constructing the multiplexed stream.